﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDb2dPolyline : OdDbCurve
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDb2dPolyline(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDb2dPolyline_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDb2dPolyline obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDb2dPolyline()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDb2dPolyline(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDb2dPolyline cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_cast(OdRxObject.getCPtr(pObj));
			OdDb2dPolyline result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb2dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb2dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb2dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDb2dPolyline_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDb2dPolyline_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDb2dPolyline_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDb2dPolyline createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_createObject();
			OdDb2dPolyline result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb2dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb2dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb2dPolyline)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public Poly2dType polyType()
		{
			Poly2dType result = (Poly2dType)TD_DbPINVOKE.OdDb2dPolyline_polyType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPolyType(Poly2dType polyType)
		{
			TD_DbPINVOKE.OdDb2dPolyline_setPolyType(this.swigCPtr, (int)polyType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void makeClosed()
		{
			TD_DbPINVOKE.OdDb2dPolyline_makeClosed(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void makeOpen()
		{
			TD_DbPINVOKE.OdDb2dPolyline_makeOpen(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double defaultStartWidth()
		{
			double result = TD_DbPINVOKE.OdDb2dPolyline_defaultStartWidth(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultStartWidth(double defaultStartWidth)
		{
			TD_DbPINVOKE.OdDb2dPolyline_setDefaultStartWidth(this.swigCPtr, defaultStartWidth);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double defaultEndWidth()
		{
			double result = TD_DbPINVOKE.OdDb2dPolyline_defaultEndWidth(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultEndWidth(double defaultEndWidth)
		{
			TD_DbPINVOKE.OdDb2dPolyline_setDefaultEndWidth(this.swigCPtr, defaultEndWidth);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double thickness()
		{
			double result = TD_DbPINVOKE.OdDb2dPolyline_thickness(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setThickness(double thickness)
		{
			TD_DbPINVOKE.OdDb2dPolyline_setThickness(this.swigCPtr, thickness);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d normal()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDb2dPolyline_normal(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setNormal(OdGeVector3d normal)
		{
			TD_DbPINVOKE.OdDb2dPolyline_setNormal(this.swigCPtr, OdGeVector3d.getCPtr(normal));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double elevation()
		{
			double result = TD_DbPINVOKE.OdDb2dPolyline_elevation(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setElevation(double elevation)
		{
			TD_DbPINVOKE.OdDb2dPolyline_setElevation(this.swigCPtr, elevation);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isLinetypeGenerationOn()
		{
			bool result = TD_DbPINVOKE.OdDb2dPolyline_isLinetypeGenerationOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLinetypeGenerationOn()
		{
			TD_DbPINVOKE.OdDb2dPolyline_setLinetypeGenerationOn(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLinetypeGenerationOff()
		{
			TD_DbPINVOKE.OdDb2dPolyline_setLinetypeGenerationOff(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void straighten()
		{
			TD_DbPINVOKE.OdDb2dPolyline_straighten(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId appendVertex(OdDb2dVertex pVertex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDb2dPolyline_appendVertex(this.swigCPtr, OdDb2dVertex.getCPtr(pVertex));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId insertVertexAt(OdDbObjectId indexVertId, OdDb2dVertex pVertex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDb2dPolyline_insertVertexAt__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(indexVertId), OdDb2dVertex.getCPtr(pVertex));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId insertVertexAt(OdDb2dVertex pIndexVert, OdDb2dVertex pVertex)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDb2dPolyline_insertVertexAt__SWIG_1(this.swigCPtr, OdDb2dVertex.getCPtr(pIndexVert), OdDb2dVertex.getCPtr(pVertex));
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDb2dVertex openVertex(OdDbObjectId vertId, OpenMode mode, bool openErasedOne)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_openVertex__SWIG_0(this.swigCPtr, OdDbObjectId.getCPtr(vertId), (int)mode, openErasedOne);
			OdDb2dVertex result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb2dVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb2dVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb2dVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDb2dVertex openVertex(OdDbObjectId vertId, OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_openVertex__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(vertId), (int)mode);
			OdDb2dVertex result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDb2dVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDb2dVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDb2dVertex)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbSequenceEnd openSequenceEnd(OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_openSequenceEnd(this.swigCPtr, (int)mode);
			OdDbSequenceEnd result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSequenceEnd)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSequenceEnd)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSequenceEnd)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectIterator vertexIterator()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_vertexIterator(this.swigCPtr);
			OdDbObjectIterator result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbObjectIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbObjectIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbObjectIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d vertexPosition(OdDb2dVertex vertex)
		{
			OdGePoint3d result = new OdGePoint3d(TD_DbPINVOKE.OdDb2dPolyline_vertexPosition(this.swigCPtr, OdDb2dVertex.getCPtr(vertex)), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool subWorldDraw(OdGiWorldDraw pWd)
		{
			bool result = TD_DbPINVOKE.OdDb2dPolyline_subWorldDraw(this.swigCPtr, OdGiWorldDraw.getCPtr(pWd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDb2dPolyline_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDb2dPolyline_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields_R12(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_dxfInFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields_R12(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDb2dPolyline_dxfOutFields_R12(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void dxfOut(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDb2dPolyline_dxfOut(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfIn(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_dxfIn(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void subClose()
		{
			TD_DbPINVOKE.OdDb2dPolyline_subClose(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subExplode(OdRxObjectPtrArray entitySet)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_subExplode(this.swigCPtr, OdRxObjectPtrArray.getCPtr(entitySet));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult explodeGeometry(OdRxObjectPtrArray entitySet)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_explodeGeometry(this.swigCPtr, OdRxObjectPtrArray.getCPtr(entitySet));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subTransformBy(OdGeMatrix3d xfm)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_subTransformBy(this.swigCPtr, OdGeMatrix3d.getCPtr(xfm));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subGetClassID(IntPtr pClsid)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_subGetClassID(this.swigCPtr, pClsid);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isPlanar()
		{
			bool result = TD_DbPINVOKE.OdDb2dPolyline_isPlanar(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getArea(out double area)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getArea(this.swigCPtr, out area);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getPlane(OdGePlane plane, out Planarity planarity)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getPlane(this.swigCPtr, OdGePlane.getCPtr(plane), out planarity);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isClosed()
		{
			bool result = TD_DbPINVOKE.OdDb2dPolyline_isClosed(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isPeriodic()
		{
			bool result = TD_DbPINVOKE.OdDb2dPolyline_isPeriodic(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getStartParam(out double startParam)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getStartParam(this.swigCPtr, out startParam);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getEndParam(out double endParam)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getEndParam(this.swigCPtr, out endParam);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getStartPoint(OdGePoint3d startPoint)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getStartPoint(this.swigCPtr, OdGePoint3d.getCPtr(startPoint));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getEndPoint(OdGePoint3d endPoint)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getEndPoint(this.swigCPtr, OdGePoint3d.getCPtr(endPoint));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getPointAtParam(double param, OdGePoint3d pointOnCurve)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getPointAtParam(this.swigCPtr, param, OdGePoint3d.getCPtr(pointOnCurve));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getParamAtPoint(OdGePoint3d pointOnCurve, out double param)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getParamAtPoint(this.swigCPtr, OdGePoint3d.getCPtr(pointOnCurve), out param);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getDistAtParam(double param, out double dist)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getDistAtParam(this.swigCPtr, param, out dist);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getParamAtDist(double dist, out double param)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getParamAtDist(this.swigCPtr, dist, out param);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getFirstDeriv(double param, OdGeVector3d firstDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getFirstDeriv(this.swigCPtr, param, OdGeVector3d.getCPtr(firstDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getSecondDeriv(double param, OdGeVector3d secondDeriv)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getSecondDeriv(this.swigCPtr, param, OdGeVector3d.getCPtr(secondDeriv));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult convertToPolyType(Poly2dType newVal)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_convertToPolyType(this.swigCPtr, (int)newVal);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult curveFit()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_curveFit(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult splineFit()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_splineFit__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult splineFit(Poly2dType splineType, short splineSegs)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_splineFit__SWIG_1(this.swigCPtr, (int)splineType, splineSegs);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subGetSubentPathsAtGsMarker(SubentType type, IntPtr gsMark, OdGePoint3d arg2, OdGeMatrix3d arg3, OdDbFullSubentPathArray subentPaths, OdDbObjectIdArray pEntAndInsertStack)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_subGetSubentPathsAtGsMarker(this.swigCPtr, (int)type, gsMark, OdGePoint3d.getCPtr(arg2), OdGeMatrix3d.getCPtr(arg3), OdDbFullSubentPathArray.getCPtr(subentPaths), OdDbObjectIdArray.getCPtr(pEntAndInsertStack));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subGetGsMarkersAtSubentPath(OdDbFullSubentPath subPath, SWIGTYPE_p_OdGsMarkerArray gsMarkers)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_subGetGsMarkersAtSubentPath(this.swigCPtr, OdDbFullSubentPath.getCPtr(subPath), SWIGTYPE_p_OdGsMarkerArray.getCPtr(gsMarkers));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdDbEntity subSubentPtr(OdDbFullSubentPath path)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDb2dPolyline_subSubentPtr(this.swigCPtr, OdDbFullSubentPath.getCPtr(path));
			OdDbEntity result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeMatrix3d getEcs()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(TD_DbPINVOKE.OdDb2dPolyline_getEcs(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getOdGeCurve(OdGeCurve3d pGeCurve, OdGeTol tol)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getOdGeCurve__SWIG_0(this.swigCPtr, pGeCurve, OdGeTol.getCPtr(tol));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult getOdGeCurve(OdGeCurve3d pGeCurve)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_getOdGeCurve__SWIG_1(this.swigCPtr, pGeCurve);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult setFromOdGeCurve(OdGeCurve3d geCurve, OdGeVector3d normal, OdGeTol tol)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_setFromOdGeCurve__SWIG_0(this.swigCPtr, OdGeCurve3d.getCPtr(geCurve), OdGeVector3d.getCPtr(normal), OdGeTol.getCPtr(tol));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult setFromOdGeCurve(OdGeCurve3d geCurve, OdGeVector3d normal)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_setFromOdGeCurve__SWIG_1(this.swigCPtr, OdGeCurve3d.getCPtr(geCurve), OdGeVector3d.getCPtr(normal));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult setFromOdGeCurve(OdGeCurve3d geCurve)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_setFromOdGeCurve__SWIG_2(this.swigCPtr, OdGeCurve3d.getCPtr(geCurve));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult reverseCurve()
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDb2dPolyline_reverseCurve(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
